package com.springboot.cloud.sysapps.exam.rest;

import com.springboot.cloud.common.core.entity.vo.Result;
import com.springboot.cloud.sysapps.exam.service.ISubjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/subject")
@Api("subject")
@Slf4j
public class SubjectController {

    @Autowired
    private ISubjectService subjectService;

    @ApiOperation(value = "获取所有专业", notes = "获取所有专业")
    @GetMapping("/all")
    public Result all(){
       return Result.success(subjectService.all());
    }
}
